
-widget :class => 'hentry', :id => 'profile_details' do
  %h3
    = link_to @user.login, user_path(@user)
    -if @user.featured_writer?
      %small=:featured_writer.l


  - if @is_current_user
    - if @user.avatar
      = @user.vendor ? "<div class='right_corner'><div class='community_pro'></div></div>".html_safe : ''
      = @user.featured_writer ? "<div class='right_corner'><div class='featured_writer'></div></div>".html_safe : ''
      = link_to :profile_photo_crop.l, crop_profile_photo_user_path(@user)
    - else
      =:no_profile_photo.l
      = link_to :click_here_to_upload_one.l, edit_user_path(@user)
    %br
  = image_tag( @user.avatar_photo_url(:medium), :class => "img-responsive")

  - if current_user and current_user.can_request_friendship_with(@user)
    %p= add_friend_link(@user)

  %ul
    %li.update
      %a{:href=>"#{user_path(@user)}", :rel=>"bookmark"}
        %abbr.published{:title=>"#{@user.created_at}"}
          =:member_since.l+" #{I18n.l(@user.created_at, :format => :short_published_date)}"
    %li.view
      =:view_count.l
      = "(#{@user.view_count})"
    - if @user.tags.any?
      %li.tags= "#{:my_tags.l}: #{@user.tags.collect{|t| link_to t.name, tag_url(t) }.join(", ")}".html_safe
    - if @user.metro_area
      %li.geo= link_to( @user.full_location, users_path(:metro_area_id => @user.metro_area_id, :state_id => @user.state_id, :country_id => @user.country_id ) )
    - if current_user && @user != current_user
      %li.compose= link_to(:send_me_a_message.l, new_user_message_path(current_user, :to=>@user))

- if current_user && current_user.admin?
  -widget do
    %h4
      .small=:admin_controls.l
    %ul.list-unstyled
      %li= link_to(:assume_user_id.l, assume_user_path(@user), {:method => :post} )
      %li= link_to(:delete_this_user.l, user_path(@user), {:method => :delete, data: { confirm: :are_you_sure_you_want_to_permanently_delete_this_user.l }} )
      %li= link_to("#{:toggle.l} #{:featured_writer.l}".html_safe, toggle_featured_user_path(@user), {:method => :patch} )
      %li= link_to("#{:assign_role.l}: #{@user.moderator? ? :member.l : :moderator.l}".html_safe, toggle_moderator_user_path(@user), {:method => :patch} )

